from openpyxl import load_workbook
workbook=load_workbook(filename='D:\\sms\\python02\\工作.xlsx')
sheet=workbook.active
sheet['B4']='=AVERAGE(B2:B3)'
workbook.save(filename='D:\\sms\\python02\\工作.xlsx')
# 查看适用的公式
# from openpyxl.utils import FORMULAE
# print(FORMULAE)